package com.vitech.javacertification.oo;

import java.io.File;


public class Alpha {

	public void foo() {
		System.out.println("Alpha foo");
		

	}

	public static void main(String... args) {

		Alpha a = new Beta();

		Beta b = (Beta) a;

		a.foo();
		b.foo();

		int x[][] = { { 1, 2, 3 }, { 4, 5 }, { 2, 4, 5, 9 } };

		System.out.println(x[0][0]);
		System.out.println(x[0][1]);
		System.out.println(x[0][2]);

		System.out.println(x[1][0]);
		System.out.println(x[1][1]);

		System.out.println(x[2][0]);
		System.out.println(x[2][1]);
		System.out.println(x[2][2]);
		System.out.println(x[2][3]);

		int []y[][] = { { { 1, 2, 3 }, { 1, 2, 3 } },
				{ { 5, 6, 7 }, { 8, 9, 0 } } };

		System.out.println(y[0][0][0]);
		System.out.println(y[0][0][1]);
		System.out.println(y[0][0][2]);
		
		System.out.println(y[0][1][0]);
		System.out.println(y[0][1][1]);
		System.out.println(y[0][1][2]);
		
		
		Integer i = 12;
		
		int j = 12;
		
		ohno(j);
		
		System.out.println(" zzz " + j++);
		
		
		String s = "aaaa . bbbb . cccc";
		
		String[] result = s.split("\\w\\.");
		
		System.out.println(result[0]);
		
		
		File f = new File("xxx");
		
		f.renameTo(f);
		

	}
	
	protected Object killme(){
		return "";
		
	}
	
	
	static void ohno(int i){
		
		System.out.println(i++);
	}

}

class Beta extends Alpha {

	public void foo() {
		System.out.println("Beta foo");
	}
	
	public String killme(){
		return null;
		
	}

}